import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    messageDialogObj: { // alert弹窗
      visible: false,
      time: 0,
      txt: ''
    }
  },
  mutations: {
    setMessageDialogObj (state, payload) {
      console.log(payload)
      state.messageDialogObj = {
        visible: payload.visible,
        time: payload.time,
        txt: payload.txt
      }
    }
  },
  actions: {

  }
})
